from flask import Flask, render_template, request

# from database.create_table import db,Patient,Mri
from flask_sqlalchemy import SQLAlchemy
from database.tools.configs import dburl
import pymysql
pymysql.install_as_MySQLdb()


app = Flask(
    import_name=__name__,
    static_url_path="/python",  # 配置静态文件的访问url前缀
    static_folder="static",  # 配置静态文件的文件夹
    template_folder="templates",# 配置模板文件的文件夹
)  

app.app_context().push()
#######################################cfg
app.config['SQLALCHEMY_DATABASE_URI'] = dburl
#######################################
db = SQLAlchemy(app)